import 'package:flutter/material.dart';

class RegisterFirst extends StatefulWidget {
  RegisterFirst({Key? key}) : super(key: key);

  @override
  _RegisterState createState() => _RegisterState();
}

class _RegisterState extends State<RegisterFirst> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Register Page'),
      ),
      body: Column(
        children: [
          Text("注册第一步"),
          ElevatedButton(
              onPressed: () {
                Navigator.pushNamed(context, "/register/next");
                //替换当前路由，相当当前路由栈先出栈，即/registerFrist出栈，然后/register/next入栈
                //Navigator.of(context).pushReplacementNamed("/register/next");
              },
              child: Text('下一步'))
        ],
      ),
    );
  }
}
